﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BattleThis.Common
{
	public class SelectionWidget : BattleThis.IWidget
	{

		#region Variablen
		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the order.
		/// </summary>
		/// <value>
		/// The order.
		/// </value>
		public int Order { get; set; }
		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		/// <value>
		/// The name.
		/// </value>
		public string Name { get; protected set; }
		/// <summary>
		/// Gets or sets the model.
		/// </summary>
		/// <value>
		/// The model.
		/// </value>
		public Object WidgetData { get { return this.Selection; } }
		/// <summary>
		/// Gets or sets the selection data.
		/// </summary>
		/// <value>
		/// The selection data.
		/// </value>
		public Selection Selection { get; protected set; }

		#endregion

		#region Methoden

		/// <summary>
		/// Initializes a new instance of the <see cref="SelectionWidget"/> class.
		/// </summary>
		/// <param name="context">The context.</param>
		public SelectionWidget( GameContext context )
		{
			if( context == null )throw new ArgumentNullException( "context" );

			this.Name = "Selection";
			this.Selection = context.Selection;
			this.Order = 1;
		}

		#endregion

		
	}
}